package com.fatgirl.patterns.state.fsm
{
	import com.fatgirl.patterns.iterator.IIterator;
	
	/**
	 *  
	 * 状态集迭代器
	 * @author iceman
	 * 
	 */
	public class FSMStateIterator implements IIterator
	{
		private var m_collection:Vector.<IFSMState>;
		private var m_index:uint;
		public function FSMStateIterator(_list:Vector.<IFSMState>)
		{
			m_collection = _list;
			m_index = 0;
		}
		
		public function reset():void
		{
			m_index = 0;
		}
		
		public function next():Object
		{
			return m_collection[m_index++];
		}
		
		public function hasNext():Boolean
		{
			return m_index<m_collection.length;
		}
	}
}